package acwing._2LanQiao._10Other;
/**
 * @Project : AlgorithmLearning
 * @Package : ACWing._2LanQiao._10Other
 * @File : Q1242.java
 * @Author : WangRuoyu
 * @Date : 2023/3/26 9:32
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

// 并查集
public class Q1242 {

    static final int N = 1000010;
    static int[] st;

    static int find(int x) {
        if (st[x] != x) st[x] = find(st[x]);
        return st[x];
    }

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] words = br.readLine().split(" ");

        int n = Integer.parseInt(words[0]);
        st = new int[N];
        for (int i = 1; i < N; ++i) {
            st[i] = i;
        }
        int[] nums = new int[n + 1];
        words = br.readLine().split(" ");
        for (int i = 1; i <= n; ++i) {
            int x = Integer.parseInt(words[i - 1]);
            x = find(x);
            System.out.print(x + " ");
            st[x] = x + 1;
        }
    }
}

// 暴力 超时
//public class Q1242 {
//    public static void main(String[] args) throws IOException {
//        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//        String[] words = br.readLine().split(" ");
//
//        int n = Integer.parseInt(words[0]);
//        boolean st[] = new boolean[1000010];
//        int[] nums = new int[n + 1];
//        words = br.readLine().split(" ");
//
//        for (int i = 1; i <= n; ++i) {
//            int x = Integer.parseInt(words[i - 1]);
//            if (!st[x]) {
//                st[x] = true;
//                nums[i] = x;
//            } else {
//                while (st[++x]) ;
//                st[x] = true;
//                nums[i] = x;
//            }
//        }
//
//        for (int i = 1; i <= n; ++i) {
//            System.out.print(nums[i] + " ");
//        }
//    }
//}
